import request from './request.js'

// 显示器

// 获取详情
export const reqGetDeviceDetail = (deviceId) => {
  return request({
    method: 'GET',
    url: `/cinorecycle/all-in-one/id/${deviceId}`
  })
}

// 修改显示器
export const reqUpdateScreen = (data) => {
  return request({
    method: 'PUT',
    url: '/cinorecycle/test-device-monitor/monitor',
    data
  })
}

// 获取设备
export const reqGetDevices = () => {
  return request({
    method: 'GET',
    url: '/cinorecycle/recycle-device-type/all'
  })
}
// 获取品牌
export const reqGetBrands = (typeId) => {
  return request({
    method: 'GET',
    url: `/cinorecycle/model/by_human/select_brand_or_model_by_type/${typeId}`

  })
}

// 获取型号
export const reqGetModels = (typeId, brand) => {
  return request({
    method: 'GET',
    url: `/cinorecycle/model/by_human/select_brand_or_model_by_type/${typeId}/${brand}`

  })
}

// 查询所有po
export const reqGetAllPo = (params) => {
  return request({
    method: 'GET',
    url: '/cinorecycle/business_project/select_list_po_s',
    params
  })
}
// 获取备注
export const reqGetCheckMarks = (typeId) => {
  return request({
    method: 'GET',
    url: `/cinorecycle/test-device-mark/marks/${typeId}`
  })
}
// 打印
export const reqPrint = (deviceId, userId) => {
  return request({
    method: 'GET',
    url: `/cinorecycle/all-in-one/print-qr/${deviceId}/${userId}`
  })
}

// 获取po
export const reqGetPos = (data) => {
  return request({
    method: 'POST',
    url: '/cinorecycle/business_project/get_po',
    data
  })
}

// 根据po获取类型和数量
export const reqGetTypeAndNumByPo = (poId) => {
  return request({
    method: 'GET',
    url: `/cinorecycle/all-in-one/id/po/${poId}`
  })
}
